// 全局共享数据示例
// import { DEFAULT_NAME } from '@/constants';
import { useState } from 'react';
import data from '../assets/history_score.json'
import total from '../assets/total.json'
import detail from '../assets/detail.json'

const useUser = () => {
  // const [name, setName] = useState<string>(DEFAULT_NAME);
  // return {
  //   name,
  //   setName,
  // };
  const [scoreData , setScoreData] = useState(data);
  const [totalData, setTotalData] = useState(total);
  const [detailData, setDetailData] = useState(detail);


  return {
    scoreData,
    setScoreData,
    totalData, 
    setTotalData, 
    detailData, 
    setDetailData,
  }

};

export default useUser;
